home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
system
/
danix201.zip
/
CUT.1
< prev
next >
Wrap
Text File
|
1994-01-15
|
2KB
|
46 lines
CUT(1) Danix Utilities CUT(1)
NAME
cut - cut selected fields or columns from given files
SYNOPSIS
cut -c<list> files ...
cut -f<list> [ -d<char> ] [ -s ] files ...
DESCRIPTION
cut prints out selected characters or fields from each line of
the given files. If the file list is empty or a '-' is
encountered in the file list, input is taken from standard input.
<list> specifies which characters or fields to print. It consists
of any number of comma-separated integers of the selected
fields or columns. 1,2,3,5 will print out the first,
second, third, and fifth fields or characters of each line.
Lists can be shortened by using ranges of numbers, such as
1-3,5 which gives the same result as before. If the
beginning integer of a range is omitted (i.e. -5,7) it is
assumed to be 1. A missing ending integer will cause the
rest of the line to be printed.
-c specifies character positions to be printed out. (cut -c3,5
will print out the third and fifth character of each line.)
-f specifes fields to be printed out. Fields are assumed to be
separated by a tab character.
-d specify a field delimiter for the -f option. A space or
other characters which the shell may interpret incorrectly
should be quoted. (cut -d" " -f<list> ...)
-s Suppresses the printing of lines without the delimiter
character, in the case of the -f option.
EXAMPLES
cut -f2 -d, files ...
display the second field of each line of each of the given
files. Fields in this case are separated by commas.
<command> | cut -c-5 file -
display the first five characters of each line of the given
file as well as the first five characters of each line of the
standard input